
<?php if ($float == 'bottom'): ?>
    <div class="owl-carousel slider-models slider-models2">
        <?php foreach ($images as $image): if ($image==1)  continue; ?>
            <?php $src = $this->getController()->getImageUrl('/image/resize/200x150/uploads/images/users/' . $image); ?>
            <div style="padding: 0 22px;">
                <div class="slider-models__photo">
                    <a class="fancybox" rel="gallery" href="/uploads/images/users/<?php echo $image; ?>">
                        <img src="<?php echo $src; ?>">
                    </a>
                </div>
            </div>
        <?php endforeach; ?>
    </div>   
<?php else: ?>
    <?php $aPath = Yii::app()->theme->baseUrl . '/assets/'; ?>
    <link rel="stylesheet" type="text/css" href="<?php echo $aPath; ?>css/slick.css"/>

    <link rel="stylesheet" type="text/css" href="<?php echo $aPath; ?>css/slick-theme.css"/>
    <script type="text/javascript" src="<?php echo $aPath; ?>js/slick.min.js"></script>
    <div class="slider multiple-items">
        <?php foreach ($images as $key => $image): ?>
            <?php
            $src1 = $this->getController()->getImageUrl('/image/resize/200x150/uploads/images/users/' . $image);
            $src2 = $this->getController()->getImageUrl('/image/resize/200x150/uploads/images/users/' . (isset($images[$key + 1]) ? $images[$key + 1] : 0));
            if ($key % 2 ==0)
                continue;
            if ($key+1 == $count)
                break;
            ?>
            <div>
                <ul class="slick-slide">
                    <li>
                        <a class="fancybox" rel="gallery" href="/uploads/images/users/<?php echo $image; ?>">
                            <img src="<?php echo $src1; ?>">
                        </a>
                    </li>
                    <li>
                        <a class="fancybox" rel="gallery" href="/uploads/images/users/<?php echo $images[$key + 1]; ?>">
                            <img src="<?php echo $src2; ?>">
                        </a>
                    </li>
                </ul>
            </div>
        <?php endforeach; ?>
    </div>
    <style>
        .slick-slide li {
            float: left;
            list-style-type: none;
        }
        .slick-slide li a{

        }
        .slick-slide img {
            width: 140px;
            padding-right: 10px;            
        }
    </style>
    <script>
        $(document).ready(function () {
            $('.multiple-items').slick({
                slidesToShow: 3,
                infinite: true,
                vertical: true,
                verticalSwiping: true,
                adaptiveHeight: true,
                autoplay: true,
                autoplaySpeed: 2000,
            });
        });
    </script>
<?php endif; ?>